<?php Menu_JS($MenuNum)
{

?>
<script language="javascript"  type="text/javascript">
<!--
NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;

function expandIt(index){//-----------------------------------------
var menuitem=new Array()
<?php
for($i=1;$i<=$MenuNum;$i++)
{
?>
menuitem[<?php echo $i;?>]=System_Child_<?php echo $i;?>
<?
}
?>
if (menuitem[index].style.display=="block"){
displayall()
}
else {
displayall()
menuitem[index].style.display="block"
}
}

function displayall(){//-----------------------------------------------------------
<?php
for($i=1;$i<=$MenuNum;$i++)
{
?>

System_Child_<?php echo $i;?>.style .display ="none"
<?php
}
?>
}
function arrange() {
    nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height;
    for (i=firstInd+1; i<document.layers.length; i++) {
        whichEl = document.layers[i];
        if (whichEl.visibility != "hide") {
            whichEl.pageY = nextY;
            nextY += whichEl.document.height;
        }
    }
}
function initIt(){
    if (!ver4) return;
    if (NS4) {
        for (i=0; i<document.layers.length; i++) {
            whichEl = document.layers[i];
            if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
       }
        arrange();
    }
    else {
        divColl = document.all.tags("DIV");
        for (i=0; i<divColl.length; i++) {
            whichEl = divColl(i);
            if (whichEl.className == "child") whichEl.style.display = "none";
        }
    }
 }
onload = initIt;
//-->
</script>
<?php
?
?>